<ui:composition template="template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    <ui:define name="conteudo">
        <h:dataTable id="Usuario"  value="#{formCampanhas.lista}" var="camp" border="1" cellspacing="2">
            <h:column>
                <h:outputText value="#{camp.descricao}" />
            </h:column>
            <h:column>
                <h:outputText value="#{camp.titulo}" />
            </h:column>
            <h:column>
                <h:outputText value="#{camp.login.email}" />
            </h:column>
            <h:column>
                <h:form>
                    <h:commandLink value="Editar" action="#{formCampanhas.editar}" />
                </h:form>
            </h:column>
            <h:column>
                <h:form>
                    <h:commandLink value="Excluir" action="#{formCampanhas.delete}" />
                </h:form>
            </h:column>
        </h:dataTable>
        <h:form>
            <h:commandLink value="Nova campanha" action="#{formCampanhas.create}" />
        </h:form>
        <h:messages id="messages" />
    </ui:define>
</ui:composition>
